package test;
import java.util.Scanner;
    class ArrayHandler {
        static int[] a = new int[5];
        static char[] b = {'A', 'B', 'C', 'D', 'E'};

        ArrayHandler() {
        }

        static void f(int i) {
            if (i == 5) {
                if (a[0] == a[1] && a[1]!= a[2] && a[3] == 0 && a[2] + a[4] <= 1) {
                    for (int j = 0; j < 5; j++) {
                        if (a[j] == 1) {
                            System.out.print(b[j] + " ");
                        }
                    }
                    System.out.println();
                } return ;
            }
            f(i + 1);
            a[i] = 1;
            f(i + 1);
            a[i] = 0;
        }
    }

    public class new1 {
        public static void main(String[] args) {
            Scanner scan = new Scanner(System.in);
            //在此输入您的代码...
            ArrayHandler c = new ArrayHandler();
            c.f(0);
            scan.close();
        }
    }

